/*
 * @Author: wangyongcun
 * @Date: 2023-02-21 19:53:05
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-06-08 18:38:56
 * @Description: 课程类型管理-接口定义和函数集合
 */
import { Request } from "@/utils/axios";

// ** 表头定义
export const tableColumn = [
    {
        prop: "courseTimetableName",
        label: "课表名称",
        minWidth: "180",
    },
    {
        prop: "场地",
        label: "场地",
        minWidth: "180",
    },
    {
        prop: "duration",
        label: "课程时长",
        minWidth: "180",
    },
    {
        prop: "stuCount",
        label: "可预约人数",
        minWidth: "180",
    },
    {
        prop: "createTime",
        label: "操作时间",
        minWidth: "180",
    }
];

/**
 * @description: 添加
 * @param {*} params
 * @return {*}
 */
export const addRequest = async (params) => {
    return Request.post("/teaching-business/timeTable/addTimeTable", params, {
        headers: {
            autoTip: "fail",
        },
    });
};

/**
 * @description: 更新课程
 * @param {*} params
 * @return {*}
 */
export const updateRequest = async (params) => {
    return Request.post("/teaching-business/timeTable/updateTimeTable", params, {
        headers: {
            autoTip: "fail",
        },
    });
};

/**
 * @description: 删除
 * @param {*} params
 * @return {*}
 */
export const deleteRequest = async (params) => {
    return Request.post("/teaching-business/timeTable/deleteTimeTable", params, {
        headers: {
            autoTip: "fail",
        },
    });
};

/**
 * @description: 获取列表
 * @param {*} params
 * @return {*}
 */
export const queryListRequest = async (params) => {
    return Request.get("/teaching-business/timeTable/queryAllTimeTable", { params }, {
        headers: {
            autoTip: "fail",
        },
    });
};
